
ACLOCAL_AMFLAGS=-I m4

SUBDIRS = libvirtnet libmlxdevm/lib controller controller/jsonrpc

EXTRA_DIST = virtio-net-controller.spec \
	     README.md \
	     autogen.sh \
	     debian \
	     controller/virtnet \
	     scripts/virtio-net-controller.service \
	     scripts/mlnx_virtnet_check

install:
	$(MAKE) -C controller install DESTDIR=${DESTDIR}
	cp ./controller/virtnet ${DESTDIR}/usr/sbin
	mkdir -p ${DESTDIR}/etc/systemd/system
	cp ./scripts/virtio-net-controller.service ${DESTDIR}/etc/systemd/system
	cp ./scripts/mlnx_virtnet_check ${DESTDIR}/usr/sbin
	mkdir -p ${DESTDIR}/opt/mellanox/mlnx_virtnet
	cp ./README.md ${DESTDIR}/opt/mellanox/mlnx_virtnet/
	systemctl daemon-reload
